﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Spelprojekt.View
{
    class ParticleView
    {
        public void Render(Camera a_camera, ParticleSystem a_pSystem, SpriteBatch spriteBatch, GameAssets a_assets)
        {
            spriteBatch.Begin();

            foreach (Particle particle in a_pSystem.GetParticles())
            {
                Rectangle rect = a_camera.GetViewRectangleCenter(particle.m_position, particle.m_size);
                spriteBatch.Draw(a_assets.m_blood, rect, particle.m_color);
            }

            spriteBatch.End();
        }
    }
}
